﻿@model SnippetBox.Web.Models.CategoryDetailsModel

@{
    ViewBag.Title = Model.Category.Name;
}

<header>
    @if (Model.Category.CanCreate(User as User)) {
    <a href="@Url.Action("Create", "Snippets", new { categoryId = Model.Category.CategoryId, area ="Manage" })" class="lightButton fleft" title="create a new snippet in this category">New</a>
    }
    <h1>@Model.Category.Name</h1>
</header>

@foreach (var snippet in Model.Snippets) {
    @Html.DisplayFor(m => snippet)
}

@if (Model.Snippets.PageCount > 1) {
    @Html.Pager(Model.Snippets)
}

